CONFIG_MODULE_SIG = n
KERNEL_DIR := /lib/modules/$(shell uname -r)/build
PROJECT_DIR := $(shell pwd)

MODULE_NAME := test-sysfs

OBJ_FILES = main.o

ccflags-y = $(KERNEL_CFLAGS)

obj-m := $(MODULE_NAME).o

$(MODULE_NAME)-objs := $(OBJ_FILES)

all:
	$(MAKE) -C $(KERNEL_DIR) M=$(PROJECT_DIR) modules
# 	insmod $(MODULE_TEST_REQ).ko

clean:
# 	rmmod $(MODULE_TEST_REQ).ko
	$(MAKE) -C $(KERNEL_DIR) M=$(PROJECT_DIR) clean
	rm -rf *.ko *.mod.* *.o *.symvers *.order
